package com.loongtech.bi.entity.client;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "event_analysis")
public class EntityEventAnalysis implements Serializable{
	private static final long serialVersionUID = 2L;
	
	@Id
	private Date day; // 日期
	@Id
	private String serverid;
	@Id
	private String channelid;
	@Id
	private String platformid;
	@Id
	private String stepcode;
	@Column(columnDefinition="int(11) NOT NULL default 0")
	private Integer finishnum;
	@Column(columnDefinition="int(11) NOT NULL default 0")
	private Integer uuidnum;
	@Column(columnDefinition="int(11) NOT NULL default 0")
	private Integer useridnum;
	@Column(columnDefinition="int(11) NOT NULL default 0")
	private Integer roleidnum;
	public Date getDay() {
		return day;
	}
	public void setDay(Date day) {
		this.day = day;
	}
	public String getServerid() {
		return serverid;
	}
	public void setServerid(String serverid) {
		this.serverid = serverid;
	}
	public String getChannelid() {
		return channelid;
	}
	public void setChannelid(String channelid) {
		this.channelid = channelid;
	}
	public String getPlatformid() {
		return platformid;
	}
	public void setPlatformid(String platformid) {
		this.platformid = platformid;
	}
	public String getStepcode() {
		return stepcode;
	}
	public void setStepcode(String stepcode) {
		this.stepcode = stepcode;
	}
	public Integer getFinishnum() {
		return finishnum;
	}
	public void setFinishnum(Integer finishnum) {
		this.finishnum = finishnum;
	}
	public Integer getUuidnum() {
		return uuidnum;
	}
	public void setUuidnum(Integer uuidnum) {
		this.uuidnum = uuidnum;
	}
	public Integer getUseridnum() {
		return useridnum;
	}
	public void setUseridnum(Integer useridnum) {
		this.useridnum = useridnum;
	}
	public Integer getRoleidnum() {
		return roleidnum;
	}
	public void setRoleidnum(Integer roleidnum) {
		this.roleidnum = roleidnum;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((channelid == null) ? 0 : channelid.hashCode());
		result = prime * result + ((day == null) ? 0 : day.hashCode());
		result = prime * result
				+ ((finishnum == null) ? 0 : finishnum.hashCode());
		result = prime * result
				+ ((platformid == null) ? 0 : platformid.hashCode());
		result = prime * result
				+ ((roleidnum == null) ? 0 : roleidnum.hashCode());
		result = prime * result
				+ ((serverid == null) ? 0 : serverid.hashCode());
		result = prime * result
				+ ((stepcode == null) ? 0 : stepcode.hashCode());
		result = prime * result
				+ ((useridnum == null) ? 0 : useridnum.hashCode());
		result = prime * result + ((uuidnum == null) ? 0 : uuidnum.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		EntityEventAnalysis other = (EntityEventAnalysis) obj;
		if (channelid == null) {
			if (other.channelid != null)
				return false;
		} else if (!channelid.equals(other.channelid))
			return false;
		if (day == null) {
			if (other.day != null)
				return false;
		} else if (!day.equals(other.day))
			return false;
		if (finishnum == null) {
			if (other.finishnum != null)
				return false;
		} else if (!finishnum.equals(other.finishnum))
			return false;
		if (platformid == null) {
			if (other.platformid != null)
				return false;
		} else if (!platformid.equals(other.platformid))
			return false;
		if (roleidnum == null) {
			if (other.roleidnum != null)
				return false;
		} else if (!roleidnum.equals(other.roleidnum))
			return false;
		if (serverid == null) {
			if (other.serverid != null)
				return false;
		} else if (!serverid.equals(other.serverid))
			return false;
		if (stepcode == null) {
			if (other.stepcode != null)
				return false;
		} else if (!stepcode.equals(other.stepcode))
			return false;
		if (useridnum == null) {
			if (other.useridnum != null)
				return false;
		} else if (!useridnum.equals(other.useridnum))
			return false;
		if (uuidnum == null) {
			if (other.uuidnum != null)
				return false;
		} else if (!uuidnum.equals(other.uuidnum))
			return false;
		return true;
	}
	
	@Override
	public String toString() {
		return "EntityEventAnalysis [day=" + day + ", serverid=" + serverid
				+ ", channelid=" + channelid + ", platformid=" + platformid
				+ ", stepcode=" + stepcode + ", finishnum=" + finishnum
				+ ", uuidnum=" + uuidnum + ", useridnum=" + useridnum
				+ ", roleidnum=" + roleidnum + "]";
	}
}
